\(\int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx\) [42]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 15 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {\arctan (x)}{3}+\frac {1}{3} \arctan (2 x) \]

[Out]

1/3*arctan(x)+1/3*arctan(2*x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1177, 209} \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {\arctan (x)}{3}+\frac {1}{3} \arctan (2 x) \]

[In]

Int[(1 + 2*x^2)/(1 + 5*x^2 + 4*x^4),x]

[Out]

ArcTan[x]/3 + ArcTan[2*x]/3

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1177

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && GtQ[b^2
 - 4*a*c, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2}{3} \int \frac {1}{1+4 x^2} \, dx+\frac {4}{3} \int \frac {1}{4+4 x^2} \, dx \\ & = \frac {1}{3} \tan ^{-1}(x)+\frac {1}{3} \tan ^{-1}(2 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.13 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=-\frac {1}{3} \arctan \left (\frac {3 x}{-1+2 x^2}\right ) \]

[In]

Integrate[(1 + 2*x^2)/(1 + 5*x^2 + 4*x^4),x]

[Out]

-1/3*ArcTan[(3*x)/(-1 + 2*x^2)]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.80

method result size
default \(\frac {\arctan \left (x \right )}{3}+\frac {\arctan \left (2 x \right )}{3}\) \(12\)
risch \(\frac {\arctan \left (\frac {2 x}{3}\right )}{3}+\frac {\arctan \left (\frac {4}{3} x^{3}+\frac {7}{3} x \right )}{3}\) \(20\)
parallelrisch \(-\frac {i \ln \left (x -i\right )}{6}+\frac {i \ln \left (x +i\right )}{6}-\frac {i \ln \left (x -\frac {i}{2}\right )}{6}+\frac {i \ln \left (x +\frac {i}{2}\right )}{6}\) \(34\)

[In]

int((2*x^2+1)/(4*x^4+5*x^2+1),x,method=_RETURNVERBOSE)

[Out]

1/3*arctan(x)+1/3*arctan(2*x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.27 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {1}{3} \, \arctan \left (\frac {4}{3} \, x^{3} + \frac {7}{3} \, x\right ) + \frac {1}{3} \, \arctan \left (\frac {2}{3} \, x\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4+5*x^2+1),x, algorithm="fricas")

[Out]

1/3*arctan(4/3*x^3 + 7/3*x) + 1/3*arctan(2/3*x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 22 vs. \(2 (10) = 20\).

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.47 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {\operatorname {atan}{\left (\frac {2 x}{3} \right )}}{3} + \frac {\operatorname {atan}{\left (\frac {4 x^{3}}{3} + \frac {7 x}{3} \right )}}{3} \]

[In]

integrate((2*x**2+1)/(4*x**4+5*x**2+1),x)

[Out]

atan(2*x/3)/3 + atan(4*x**3/3 + 7*x/3)/3

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.73 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {1}{3} \, \arctan \left (2 \, x\right ) + \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4+5*x^2+1),x, algorithm="maxima")

[Out]

1/3*arctan(2*x) + 1/3*arctan(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.73 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {1}{3} \, \arctan \left (2 \, x\right ) + \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4+5*x^2+1),x, algorithm="giac")

[Out]

1/3*arctan(2*x) + 1/3*arctan(x)

Mupad [B] (verification not implemented)

Time = 13.61 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.27 \[ \int \frac {1+2 x^2}{1+5 x^2+4 x^4} \, dx=\frac {\mathrm {atan}\left (\frac {2\,x}{3}\right )}{3}+\frac {\mathrm {atan}\left (\frac {4\,x^3}{3}+\frac {7\,x}{3}\right )}{3} \]

[In]

int((2*x^2 + 1)/(5*x^2 + 4*x^4 + 1),x)

[Out]

atan((2*x)/3)/3 + atan((7*x)/3 + (4*x^3)/3)/3